/*******************************************************************************
 * Copyright (c) 2008 Sylvain Sicard.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Contributors:
 *     Sylvain Sicard - initial API and implementation
 ******************************************************************************/
package fr.jade.fraclite.api;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class State implements Serializable {

  private static final long serialVersionUID = 1L;
  
  protected Map<String, Object> state = null;
  
  public State(){
    state = new HashMap<String, Object>();
  }
  
  public Set<String> listFiels(){
    return state.keySet();
  }
  
  public Object getFieldValue(String fieldName){
    return state.get(fieldName);
  }
  
  public void setFieldValue(String fieldName, Object fieldValue){
    state.put(fieldName, fieldValue);
  }
}
